<?php

header("content-type:application/json;charset:utf-8");
$arr=[
    "name"=>"tom",
    "city"=>"nanjin"
];
$arr["age"]=12;
echo json_encode($arr);

?>